package com.heima.admin.controller.v1;

import com.heima.admin.service.AdminUserService;
import com.heima.model.admin.dtos.AdminUserDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("api/v1/auth")
public class AdminUserController {

    @Autowired
    private AdminUserService adminUserService;

    @PostMapping("/list")
    public ResponseResult findList(@RequestBody AdminUserDto dto) {
        return adminUserService.findList(dto);
    }

    @PostMapping("/authFail")
    public ResponseResult fail(@RequestBody AdminUserDto dto) {
        return adminUserService.fail(dto);
    }

    @PostMapping("/authPass")
    public ResponseResult success(@RequestBody AdminUserDto dto) {
        return adminUserService.success(dto);
    }

}
